using System.Diagnostics;

using MicrosoftLogging = Microsoft.Practices.EnterpriseLibrary.Logging;

namespace SiteParser.Core.Logging
{
	/// <summary>
	/// 
	/// </summary>
	public static class Logger
	{
		public static void Write(object message, TraceEventType severity) {
			Write(message, LoggerCategory.Default, severity);
		}

		public static void Write(object message, string category, TraceEventType severity) {
			MicrosoftLogging.Logger.Write(message, category, 0, 0, severity);
		}

		public static void Debug(object message) {
			Debug(message, LoggerCategory.Default);
		}

		public static void Debug(object message, string category) {
			Write(message, category, TraceEventType.Verbose);
		}

		public static void Info(object message) {
			Info(message, LoggerCategory.Default);
		}

		public static void Info(object message, string category) {
			Write(message, category, TraceEventType.Information);
		}

		public static void Warning(object message) {
			Warning(message, LoggerCategory.Default);
		}

		public static void Warning(object message, string category) {
			Write(message, category, TraceEventType.Warning);
		}

		public static void Error(object message) {
			Error(message, LoggerCategory.Default);
		}

		public static void Error(object message, string category) {
			Write(message, category, TraceEventType.Error);
		}

		public static void Fatal(object message) {
			Error(message, LoggerCategory.Default);
		}

		public static void Fatal(object message, string category) {
			Write(message, category, TraceEventType.Error);
		}
	}
}
